import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  //全局状态的值
  state: {
    userinfo:{},
    isLogin:true,
    visible:false,
  },
  //同步修改数据
  mutations: {
    changeLogin(state,payload){
      state.isLogin = payload.isLogin
},
    changeinfo(state,payload){
      state.userinfo = payload
    },
    changelogin(state,payload){
      state.visible = payload
    }
  },
  //异步修改数据/
  actions: {
  },
  modules: {
  }
})
